//
// Created by francklinson on 2021/12/31 AT 15:12.
//
#include <iostream>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <algorithm>
#include <functional>

using namespace std;

class Solution {
public:
    int countVowelSubstrings(string word) {
        unordered_set<char> vowelSet{'a', 'e', 'i', 'o', 'u'};
        int ans = 0;
        // 枚举所有子字符串
        for (int i = 0; i < word.size(); ++i) {
            unordered_set<char> curSet;
            for (int j = i; j < word.size(); ++j) {
                curSet.insert(word[j]);
                if (curSet == vowelSet) {
                    ++ans;
                }
            }
        }
        return ans;
    }
};

int main() {
    Solution solution;
    cout << solution.countVowelSubstrings("aeiouu") << endl;
    cout << solution.countVowelSubstrings("unicornarihan") << endl;
    cout << solution.countVowelSubstrings("cuaieuouac") << endl;
    cout << solution.countVowelSubstrings("bbaeixoubb") << endl;
    return 0;
}

